<template>
	<u-navbar :leftIconSize="42"  titleStyle="font-size:20px;font-weight:600" :autoBack="true"
		:placeholder='true' title="学员名单">
	</u-navbar>
	<view class="padding-30rpx">
		<view class="white-bg" style="border-radius: 4px;font-size: 15px;padding:10px 15px 15px 15px">
			<text class="font-normal font-b">{{data.orderCode}}</text>
			<view style="margin-bottom: 10px;"></view>
			<u-line color="#0000001A"></u-line>
			<view  v-for="(item,index) in data.list" style="padding-top: 15px">
				<view class="flex-jc-s-b">
					<view class="flex-al-center">
						<view class="flex-column color-black font-normal-x"
							style="align-items: flex-start;">
							<view style="">
								<text class="font-normal-x font-b" style="margin-right: 5px;">{{item.name}}</text>
								<text class="font-small-x font-b">{{item.idCard}}</text>
							</view>
							<text class="font-small" style="padding-top: 3px;">{{item.courseName}}</text>
						</view>
					</view>
					<view>
						<text class="color-orange font-b font-small-x">¥</text>
						<text class="color-orange font-b font-l">{{item.price}}</text>
						<text style="margin-left: 2px;">/{{item.dayAmount}}天</text>
					</view>
				</view>
				<u-line v-if="index < data.list.length - 1" margin="15px 0 0 0" color="#0000001A"></u-line>
			</view>
		</view>
	</view>
</template>

<script setup>
	import pageRoute from '@/utils/pageRoute'
	import { onLoad } from "@dcloudio/uni-app";
	import { reactive } from "vue";
	import { listStudent } from '../const';

	const data = reactive({
		orderId: null,
		orderCode: null,
		list: []
	})

	onLoad((options) => {
		data.orderId = options.id || '';
		data.orderCode = options.code
		ajaxListStudent(data.orderId)
	})

	function ajaxListStudent(id) {
		let reqObj = {orderId: id}
		listStudent(reqObj).then((res) => {
			data.list = res.rows
		})
	}

</script>

<style lang="scss" scoped>

</style>
